package com.warm.pump.module.work.service;

import com.warm.pump.module.work.bean.WorkTree;
import com.warm.pump.module.work.bean.po.gen.Work;
import com.warm.pump.frame.gen.bean.PageBean;

import java.util.List;
import java.util.Map;

/**
 * work
 */
public interface IWorkService {

    Work queryObject(Long id);

    Work queryObject(Map<String, Object> map);

    List<Work> queryList(Map<String, Object> map);

    PageBean getPageBeanByMap(Map map, int pageNo, int pageSize, Long jobId);

    /**
     * 获取作业树
     *
     * @return
     */
    List<WorkTree> getWorkTree();

    int queryTotal(Map<String, Object> map);

    void save(Work work);

    void update(Work work);

    void updateKeySelective(Work work);

    void delete(Map<String, Object> map);

    void delete(Long id);

    void deleteBatch(Long[] ids);

    /**
     * 通过调度任务Id 获取 作业专题 作业项 tree
     *
     * @param map
     * @param jobId
     * @return
     */
    List<WorkTree> getWorkTreeByJobIdList(Map map, Long jobId);

    /**
     * 作业管理 立即执行
     *
     * @param ids
     */
    void run(Long[] ids);
}
